package controller

import (
	"../Jgo"
	"../funcs"
	"fmt"
	"html/template"
)

type ProductController struct {
	Jgo.App
}

func (i *ProductController) Index() {

	i.Data["name"] = "Index"
	i.Data["email"] = "ijython@qq.com"
	i.Display("./view/info.html", "./view/header.html", "./view/footer.html")
	fmt.Println("OK")
	i.DisplayWithFuncs(template.FuncMap{"look": funcs.My}, "./view/info.html", "./view/header.html", "./view/footer.html")
}
func (i *ProductController) Jython() {

	i.Data["name"] = "jython"
	i.Data["email"] = "ijython@qq.com"
	template.ParseFiles("./view/info.html", "./view/header.html", "./view/footer.html")
	//i.Display("./view/info.html", "./view/header.html", "./view/footer.html")
	fmt.Println("OK")
	i.DisplayWithFuncs(template.FuncMap{"look": funcs.My}, "./view/info.html", "./view/header.html", "./view/footer.html")
}
